<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>

        div{
            width:300px;
            height: 300px;
            background-color: red;
            animation: myanim 3s linear 0s 3;
        }

        div:hover{
            animation-play-state: paused;
        }

        @keyframes myanim{
            0%{
                background-color: red;
            }
            50%{
                background-color: blue;
            }
            100%{
                background-color: aqua;
            }
        }

    </style>
</head>
<body>
    <div>

    </div>
</body>
</html>